package test;

//计算1到某个数以内能被7整除但不是偶数的数的个数。
public class IfSomeSeven {
    public static void main(String[] args) {
        int num  = 14;
        int ifed = ifDivideSeven(num);
        System.out.println(ifed);
    }
    private static int ifDivideSeven(int num) {
        int sum = 0;
        for (int i = 1; i <= num; i++) {
            if(i % 7 == 0 && i % 2 != 0){
                sum++;
            }
        }
        return sum;
    }
}
